package com.miaosha.dao;

import com.miaosha.dataobject.ProductStockDO;
import org.apache.ibatis.annotations.Param;

public interface ProductStockDOMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ProductStockDO record);

    int insertSelective(ProductStockDO record);

    ProductStockDO selectByPrimaryKey(Integer id);

    ProductStockDO selectByProductId(Integer productId);

    int updateByPrimaryKeySelective(ProductStockDO record);

    int updateByPrimaryKey(ProductStockDO record);

    int decreaseStock(@Param("productId")Integer productId, @Param("amount")Integer amount);
}